package com.study;

import java.util.Scanner;

public class Start{
    Operate operate = new Operate();

    void Printf() {
        System.out.println("欢 迎 使 用 迷 你 DVD 管 理 器");
        System.out.println("--------------------------");
        System.out.println("0.  借出排行榜");
        System.out.println("1.  新增DVD");
        System.out.println("2.  查看DVD");
        System.out.println("3.  删除DVD");
        System.out.println("4.  借出DVD");
        System.out.println("5.  归还DVD");
        System.out.println("6.  退出");
        System.out.println("--------------------------");
        System.out.print("请选择：");

        Scanner x = new Scanner(System.in);
        int choice = x.nextInt();
        switch (choice) {
            case 0:
                System.out.println("--->借出排行榜");
                operate.rentalRank();
                break;
            case 1:
                System.out.println("--->新增DVD");
                operate.addDvd();
                break;
            case 2:
                System.out.println("--->查看DVD");
                operate.checkDvd();
                break;
            case 3:
                System.out.println("--->删除DVD");
                operate.deleteDvd();
                break;
            case 4:
                System.out.println("--->借出DVD");
                operate.rentDvd();
                break;
            case 5:
                System.out.println("--->归还DVD");
                operate.returnDvd();
                break;
            case 6:
                System.out.println("感谢您的使用，再见！");
                System.exit(0);
                break;
            default:
                System.out.println("输入有误，请重新输入。");
                break;
        }
    }
}
